home *** CD-ROM | disk | FTP | other *** search
/ IRIX Installation Tools & Overlays 2002 November / SGI IRIX Installation Tools & Overlays 2002 November - Disc 4.iso / dist / motif21_dev.idb / usr / Motif-2.1 / include / Xm / DragCP.h.z / DragCP.h
C/C++ Source or Header  |  2002-10-15  |  5KB  |  208 lines

  1. /* 
  2.  *  @OSF_COPYRIGHT@
  3.  *  COPYRIGHT NOTICE
  4.  *  Copyright (c) 1990, 1991, 1992, 1993 Open Software Foundation, Inc.
  5.  *  ALL RIGHTS RESERVED (MOTIF). See the file named COPYRIGHT.MOTIF for
  6.  *  the full copyright text.
  7. */ 
  8. /* 
  9.  * HISTORY
  10. */ 
  11. /*   $XConsortium: DragCP.h /main/12 1996/10/17 16:45:27 cde-osf $ */
  12. /*
  13. *  (c) Copyright 1990, 1991, 1992 HEWLETT-PACKARD COMPANY */
  14. #ifndef _XmDragCP_h
  15. #define _XmDragCP_h
  16.  
  17. #include <Xm/XmP.h>
  18. #include <Xm/DragC.h>
  19.  
  20. #include <X11/Shell.h>
  21. #include <X11/ShellP.h>
  22.  
  23. #include <Xm/DragIcon.h>
  24. #include <Xm/DragOverS.h>
  25. #include <Xm/DropSMgrP.h>
  26.  
  27. #ifdef __cplusplus
  28. extern "C" {
  29. #endif
  30.  
  31.  
  32. /***********************************************************************
  33.  *
  34.  * DragContext (RootWrapper) Widget Private Data
  35.  *
  36.  ***********************************************************************/
  37.  
  38. typedef void    (*XmDragStartProc)( XmDragContext, Widget, XEvent *);
  39. typedef void     (*XmDragCancelProc)( XmDragContext) ;
  40.  
  41.  
  42. typedef struct {
  43.     XmDragStartProc        start;
  44.     XmDragCancelProc        cancel;
  45.     XtPointer               extension;
  46.     
  47. #ifdef _SGIMOTIF
  48.     _SgClassExtension    _SG_vendorExtension;
  49. #endif
  50.  
  51. } XmDragContextClassPart;
  52.  
  53. typedef struct _XmDragContextClassRec {
  54.     CoreClassPart              core_class;
  55.     XmDragContextClassPart    drag_class;
  56. } XmDragContextClassRec;
  57.  
  58. externalref XmDragContextClassRec xmDragContextClassRec;
  59.  
  60. #define XtDragByPoll     0
  61. #define XtDragByEvent    1
  62.  
  63. typedef struct {
  64.     Window        frame;
  65.     Window        window;
  66.     Widget        shell;
  67.     unsigned char    flags;
  68.     unsigned char    dragProtocolStyle;
  69.     int            xOrigin, yOrigin;
  70.     unsigned int    width, height;
  71.     unsigned int    depth;
  72.     XtPointer        iccInfo;
  73. } XmDragReceiverInfoStruct, *XmDragReceiverInfo;
  74.  
  75.  
  76. typedef union _XmConvertSelectionRec
  77.   {
  78.     XtConvertSelectionIncrProc sel_incr ;
  79.     XtConvertSelectionProc     sel ;
  80.   } XmConvertSelectionRec ;
  81.   
  82. #ifdef _SGIMOTIF    /* SGI drag and drop extension */
  83. /* this extension supports the ability to drag along a complete widget
  84.  * during drag and drop
  85.  */
  86.  
  87. typedef struct __SG_XmDragContextExtPart {
  88.     /* the widget being dragged */
  89.     Widget          dragAlongWidget;
  90.     /* cache of hot spots */
  91.     Position            dragAlongHotX;
  92.     Position            dragAlongHotY;
  93.     /* Allow a real X cursor to be displayed along with the dragged window */
  94.     Cursor          dragRealCursor;
  95. } _SG_XmDragContextExtPart;
  96.  
  97. typedef struct __SG_XmDragContextExt {
  98.     _SgInstanceExtensionRec common;   /* Stuff all instance rec's have */
  99.     _SG_XmDragContextExtPart    rsrc;     /* Resources & instance var's */
  100. } _SG_XmDragContextExtRec, *_SG_XmDragContextExt;
  101.  
  102. #define _SG_DragContextPtr(w) \
  103. ((_SG_XmDragContextExt)(((XmDragContext)(w))->drag._SG_vendorExtension))
  104.  
  105. #endif /* _SGIMOTIF */
  106.  
  107.  
  108. typedef struct _XmDragContextPart{
  109.     /****  resources ****/
  110.  
  111.     Atom            *exportTargets;
  112.     Cardinal            numExportTargets;
  113.     XmConvertSelectionRec    convertProc;
  114.     XtPointer            clientData;
  115.     XmDragIconObject        sourceCursorIcon;
  116.     XmDragIconObject        stateCursorIcon;
  117.     XmDragIconObject        operationCursorIcon;
  118.     XmDragIconObject        sourcePixmapIcon;
  119.     Pixel            cursorBackground;
  120.     Pixel            cursorForeground;
  121.     Pixel            validCursorForeground;
  122.     Pixel            invalidCursorForeground;
  123.     Pixel            noneCursorForeground;
  124.     XtCallbackList        dragMotionCallback;
  125.     XtCallbackList        operationChangedCallback;
  126.     XtCallbackList        siteEnterCallback;
  127.     XtCallbackList        siteLeaveCallback;
  128.     XtCallbackList        topLevelEnterCallback;
  129.     XtCallbackList        topLevelLeaveCallback;
  130.     XtCallbackList        dropStartCallback;
  131.     XtCallbackList        dropFinishCallback;
  132.     XtCallbackList        dragDropFinishCallback;
  133.     unsigned char        dragOperations;
  134.     Boolean            incremental;
  135.     unsigned char        blendModel;
  136.  
  137.     /* private resources */
  138.     Window            srcWindow;
  139.     Time            dragStartTime;
  140.     Atom            iccHandle;
  141.     Widget            sourceWidget;
  142.     Boolean            sourceIsExternal;
  143.  
  144.     /**** instance data ****/
  145.     Boolean            topWindowsFetched;
  146.     unsigned char         commType;
  147.     unsigned char        animationType;
  148.  
  149.     unsigned char        operation;
  150.     unsigned char        operations;
  151.     unsigned int        lastEventState;
  152.     unsigned char        dragCompletionStatus;
  153.     unsigned char        dragDropCompletionStatus;
  154.     Boolean            forceIPC;
  155.     Boolean            serverGrabbed;
  156.     Boolean            useLocal;
  157.     Boolean            inDropSite;
  158.     XtIntervalId         dragTimerId;
  159.     
  160.     Time            roundOffTime;
  161.     Time            lastChangeTime;
  162.     Time            crossingTime;
  163.  
  164.     Time            dragFinishTime;
  165.     Time            dropFinishTime;
  166.     
  167.     Atom            dropSelection;
  168.     Widget            srcShell;
  169.     Position        startX, startY;
  170.  
  171.     XmID            siteID;
  172.  
  173.     Screen            *currScreen;
  174.     Window            currWmRoot;
  175.     XmDragOverShellWidget    curDragOver;
  176.     XmDragOverShellWidget    origDragOver;
  177.  
  178.     XmDragReceiverInfoStruct    *currReceiverInfo;
  179.     XmDragReceiverInfoStruct    *rootReceiverInfo;
  180.     XmDragReceiverInfoStruct    *receiverInfos;
  181.     Cardinal            numReceiverInfos;
  182.     Cardinal            maxReceiverInfos;
  183.  
  184.     unsigned char        trackingMode;
  185.     unsigned char        activeProtocolStyle;
  186.     unsigned char               activeBlendModel;
  187.     Boolean            dragDropCancelEffect;
  188.     
  189. #ifdef _SGIMOTIF
  190.     _SG_XmDragContextExt    _SG_vendorExtension;
  191. #endif
  192.  
  193.     long             SaveEventMask;         /* Save the current root eventMask so that D&D works for MWM */
  194. } XmDragContextPart;
  195.  
  196.  
  197. typedef  struct _XmDragContextRec{
  198.     CorePart             core;
  199.     XmDragContextPart        drag;
  200. } XmDragContextRec;
  201.  
  202.  
  203. #ifdef __cplusplus
  204. }  /* Close scope of 'extern "C"' declaration which encloses file. */
  205. #endif
  206.  
  207. #endif /* _XmDragCP_h */
  208.